#ifndef UESRLOGINSUCCEEDCMD_H
#define UESRLOGINSUCCEEDCMD_H

#include "Command/BaseCmd.h"
#include "DataType/UserStruct.h"
#include "Protocol/CloudProtocol.h"

class UesrLoginSucceedCmd : public BaseCmd
{
    Q_OBJECT

public:
    enum{FunctionCode = CloudProtocol::UserLoginSucceed};

    Q_INVOKABLE explicit UesrLoginSucceedCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    QByteArray strUserToArrayUser(UserStruct user);

    QString mac() const;
    void setMac(const QString &mac);

    quint8 controlProtocol() const;
    void setControlProtocol(const quint8 &controlProtocol);

    QString administrator() const;
    void setAdministrator(const QString &administrator);

    QList<UserStruct> userList() const;
    void setUserList(const QList<UserStruct> &userList);

private:
    QString m_mac;
    quint8 m_controlProtocol;
    QString m_administrator;
    QList<UserStruct> m_userList;
};

#endif // UESRLOGINSUCCEEDCMD_H
